#include <stdio.h>
#define n 2
#define m 3
#define p 2

int main() {
    int a[n][m] = {1, 2, 3, 4, 5, 6};
    int b[m][p] = {1, 1, 1, 1, 1, 1};
    int c[n][p];
    int i, j, k, tmp;

    for (i = 0; i < n; i ++) {
        for (j = 0; j < p; j++) {
            c[i][j] = 0;
            for (k = 0; k < m; k++) {
                c[i][j] += a[i][k] * b[k][j];
            }
            printf("%d ", c[i][j]);
        }
        printf("\n");
    }
    return 0;
}
